package cate.game.role.login.msg;

import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgOutput;
import cate.game.client.msg.id.MsgIdBLogin;
import easy.java.dev.note.NoteField;
import lombok.ToString;

@ToString
public class LoginStartResp implements MsgOutput {

    /** 无角色，请创角 */
    public static final int CODE_PLEASE_CREATE_ROLE = 0;
    /** 该角色已被加载，可以请求初始化数据了 */
    public static final int CODE_ROLE_HAS_BEEN_LOADED = 1;
    /** 根据token找不到登录数据, 可能该token已经失效 */
    public static final int CODE_LOGIN_TOKEN_INVALID = 2;
    /** 该游戏服不允许创建角色了 */
    public static final int CODE_NOT_ALLOW_CREATE_ROLE = 3;
    /** 找不到客户端指定的角色 */
    public static final int CODE_CANNOT_FIND_ROLE = 4;
    /** 账户与角色不匹配 */
    public static final int CODE_ACCOUNT_MISMATCH_ROLE = 5;
    /** 账户被冻结 */
    public static final int CODE_ROLE_BAN_LOGIN = 6;

    @NoteField(value = "执行结果代码", example = "2")
    public int code;
    @NoteField(value = "执行结果描述", example = "login token invalid")
    public String message;

    @NoteField(value = "服务器当前时间")
    public long timestamp;
    @NoteField(value = "开服时间")
    public long openTime;
    @NoteField(value = "合服时间")
    public long mergeTime;
    @NoteField(value = "时区字符串 如：+9，+10，-10")
    public String timeZoneStr;

    @NoteField(value = "是否是微信审核环境")
    public boolean isMiniSH;

    @Override
    public MsgConfig conf() {
        return MsgIdBLogin.START_RESP;
    }
}
